package com.gigi.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 课程表
 * </p>
 *
 * @author AutoGenerator
 * @since 2024-01-17
 */
@TableName("course")
@ApiModel(value="CourseEntity对象", description="课程表")
public class CourseEntity extends Model<CourseEntity> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "课程名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "课程号")
    @TableField("no")
    private Long no;

    @ApiModelProperty(value = "图片")
    @TableField("pic")
    private String pic;

    @ApiModelProperty(value = "班级id")
    @TableField("class_id")
    private String classId;

    @ApiModelProperty(value = "用户id（老师id）")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "有效性（0无效 1有效）")
    @TableField("flag")
    private Integer flag;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public Long getNo() {
        return no;
    }

    public void setNo(Long no) {
        this.no = no;
    }
    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }
    public String getClassId() {
        return classId;
    }

    public void setClassId(String classId) {
        this.classId = classId;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CourseEntity{" +
            "id=" + id +
            ", name=" + name +
            ", no=" + no +
            ", pic=" + pic +
            ", classId=" + classId +
            ", userId=" + userId +
            ", flag=" + flag +
        "}";
    }
}
